Optimal. Leaf size=54 \[ \frac {2 \cot (c+d x)}{a^2 d}-\frac {3 \tanh ^{-1}(\cos (c+d x))}{2 a^2 d}-\frac {\cot (c+d x) \csc (c+d x)}{2 a^2 d} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.15, antiderivative size = 54, normalized size of antiderivative = 1.00, number of steps used = 8, number of rules used = 6, integrand size = 27, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.222, Rules used = {2869, 2757, 3770, 3767, 8, 3768} \[ \frac {2 \cot (c+d x)}{a^2 d}-\frac {3 \tanh ^{-1}(\cos (c+d x))}{2 a^2 d}-\frac {\cot (c+d x) \csc (c+d x)}{2 a^2 d} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 8
Rule 2757
Rule 2869
Rule 3767
Rule 3768
Rule 3770
Rubi steps
\begin {align*} \int \frac {\cos (c+d x) \cot ^3(c+d x)}{(a+a \sin (c+d x))^2} \, dx &=\frac {\int \csc ^3(c+d x) (a-a \sin (c+d x))^2 \, dx}{a^4}\\ &=\frac {\int \left (a^2 \csc (c+d x)-2 a^2 \csc ^2(c+d x)+a^2 \csc ^3(c+d x)\right ) \, dx}{a^4}\\ &=\frac {\int \csc (c+d x) \, dx}{a^2}+\frac {\int \csc ^3(c+d x) \, dx}{a^2}-\frac {2 \int \csc ^2(c+d x) \, dx}{a^2}\\ &=-\frac {\tanh ^{-1}(\cos (c+d x))}{a^2 d}-\frac {\cot (c+d x) \csc (c+d x)}{2 a^2 d}+\frac {\int \csc (c+d x) \, dx}{2 a^2}+\frac {2 \operatorname {Subst}(\int 1 \, dx,x,\cot (c+d x))}{a^2 d}\\ &=-\frac {3 \tanh ^{-1}(\cos (c+d x))}{2 a^2 d}+\frac {2 \cot (c+d x)}{a^2 d}-\frac {\cot (c+d x) \csc (c+d x)}{2 a^2 d}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 0.53, size = 86, normalized size = 1.59 \[ -\frac {\left (\sin \left (\frac {1}{2} (c+d x)\right )+\cos \left (\frac {1}{2} (c+d x)\right )\right )^4 \left (\cot (c+d x) (\csc (c+d x)-4)+3 \left (\log \left (\cos \left (\frac {1}{2} (c+d x)\right )\right )-\log \left (\sin \left (\frac {1}{2} (c+d x)\right )\right )\right )\right )}{2 a^2 d (\sin (c+d x)+1)^2} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.48, size = 93, normalized size = 1.72 \[ -\frac {3 \, {\left (\cos \left (d x + c\right )^{2} - 1\right )} \log \left (\frac {1}{2} \, \cos \left (d x + c\right ) + \frac {1}{2}\right ) - 3 \, {\left (\cos \left (d x + c\right )^{2} - 1\right )} \log \left (-\frac {1}{2} \, \cos \left (d x + c\right ) + \frac {1}{2}\right ) + 8 \, \cos \left (d x + c\right ) \sin \left (d x + c\right ) - 2 \, \cos \left (d x + c\right )}{4 \, {\left (a^{2} d \cos \left (d x + c\right )^{2} - a^{2} d\right )}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 0.22, size = 98, normalized size = 1.81 \[ \frac {\frac {12 \, \log \left ({\left | \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) \right |}\right )}{a^{2}} + \frac {a^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} - 8 \, a^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )}{a^{4}} - \frac {18 \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} - 8 \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 1}{a^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2}}}{8 \, d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.60, size = 93, normalized size = 1.72 \[ \frac {\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )}{8 a^{2} d}-\frac {\tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{d \,a^{2}}+\frac {1}{d \,a^{2} \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}+\frac {3 \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{2 d \,a^{2}}-\frac {1}{8 a^{2} d \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [B] time = 0.34, size = 115, normalized size = 2.13 \[ -\frac {\frac {\frac {8 \, \sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1} - \frac {\sin \left (d x + c\right )^{2}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{2}}}{a^{2}} - \frac {12 \, \log \left (\frac {\sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1}\right )}{a^{2}} - \frac {{\left (\frac {8 \, \sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1} - 1\right )} {\left (\cos \left (d x + c\right ) + 1\right )}^{2}}{a^{2} \sin \left (d x + c\right )^{2}}}{8 \, d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 8.69, size = 84, normalized size = 1.56 \[ \frac {{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2}{8\,a^2\,d}+\frac {3\,\ln \left (\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\right )}{2\,a^2\,d}-\frac {\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{a^2\,d}+\frac {{\mathrm {cot}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2\,\left (\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )-\frac {1}{8}\right )}{a^2\,d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [F(-1)] time = 0.00, size = 0, normalized size = 0.00 \[ \text {Timed out} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________